package net.csiit.tools.fileserver.core.repository;

import net.csiit.tools.fileserver.core.entity.FileEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author adam
 * @date 2023-06-12
 */
@Repository
public interface FileRepository extends JpaRepository<FileEntity, Long>, JpaSpecificationExecutor<FileEntity> {

    FileEntity findFirstByFileId(String fileId);

    List<FileEntity> findByFileIdIn(List<String> fileIds);

}
